package com.perfect.controller.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.function.RouterFunction;
import org.springframework.web.servlet.function.RouterFunctions;
import org.springframework.web.servlet.function.ServerResponse;

/**
 * @Description
 * @Return
 * @Author perfect
 * @Date
 **/
@Configuration
public class RouterFunctionConfig {

    @Bean
    public RouterFunction<ServerResponse> routerFunction() {
        return RouterFunctions.route()
                .GET("/anqila", request -> ServerResponse.ok().body("Hello World"))
                .POST("/anqila", request -> ServerResponse.ok().body("Hello World"))
                .build();
    }
}
